|
Download
FAQ History |
|
API
Search Feedback |
Users, Realms, and Groups
A J2EE user is similar to an operating system user. Typically, both types of users represent people. However, these two types of users are not the same. The J2EE server authentication service has no knowledge of the user name and password you provide when you log on to the operating system. The J2EE server authentication service is not connected to the security mechanism of the operating system. The two security services manage users that belong to different realms.
The J2EE server's authentication service includes the following components:
- Realm - For a Web application, a realm is a complete database of roles, users, and groups that identify valid users of a Web application (or a set of Web applications). For a J2EE application, a realm is a collection of users that are controlled by the same authentication policy.
- User - An individual (or application program) identity that has been authenticated (authentication was discussed in the previous section). In a Web application, a user can have a set of roles associated with that identity, which entitles them to access all resources protected by those roles. In a J2EE application, users can be associated with a group, which categorizes users by common traits.
- Group - Aset of authenticated users classified by common traits such as job title or customer profile. In most cases for Web applications, you will map users directly to roles and have no need to define a group.
- Role - An abstract name for the permission to access a particular set of resources in a Web application. A role can be compared to a key that can open a lock. Many people might have a copy of the key, and the lock doesn't care who you are, just that you have the right key.
The J2EE server authentication service governs users in multiple realms. Certificates are used with the HTTPS protocol to authenticate Web browser clients. To verify the identity of a user in the
certificaterealm, the authentication service verifies an X.509 certificate. For step-by-step instructions, see Setting Up Digital Certificates. The common name field of the X.509 certificate is used as the principal name.In most cases, the J2EE server authentication service verifies user identity by checking the
filerealm. This realm is used for the authentication of all clients except for Web browser clients that use the HTTPS protocol and certificates.A J2EE user of the
filerealm can belong to a J2EE group. (A user in thecertificaterealm cannot.) A J2EE group is a category of users classified by common traits, such as job title or customer profile. For example, most customers of an e-commerce application might belong to theCUSTOMERgroup, but the big spenders would belong to thePREFERREDgroup. Categorizing users into groups makes it easier to control the access of large numbers of users. The section EJB-Tier Security explains how to control user access to enterprise beans.
|
Download
FAQ History |
|
API
Search Feedback |
All of the material in The J2EE 1.4 Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.